<?php

/**
 * Zend_Form test
 * 
 * @author  Jeremy Barthe
 * @version 0.1
 */

// définition des constantes
define('WEBAPP_DIR', realpath(dirname(__FILE__) . '/../'));
define('LIBRARY', WEBAPP_DIR . '/library');
define('APP_DIR', WEBAPP_DIR . '/application');
define('MODELS_DIR', WEBAPP_DIR . '/application/models');
define('CONTROLLERS_DIR', WEBAPP_DIR . '/application/controllers');
define('FORMS_DIR', WEBAPP_DIR . '/application/forms');
define('VIEWS_DIR', WEBAPP_DIR . '/application/views');
define('LAYOUTS_DIR', WEBAPP_DIR . '/application/layouts');
define('HELPERS_DIR', WEBAPP_DIR . '/application/views/helpers');
define('PARTIALS_DIR', WEBAPP_DIR . '/application/views/scripts/partials');
define('LANGUAGES_DIR', WEBAPP_DIR . '/application/languages');

// relative URL (idem .htaccess)
define('BASE_URL', '/form-zf/public');

// include path
set_include_path(
    LIBRARY . PATH_SEPARATOR .
    MODELS_DIR . PATH_SEPARATOR .
    FORMS_DIR . PATH_SEPARATOR .
    '.' . PATH_SEPARATOR .
    get_include_path()
);

require_once APP_DIR . '/Initializer.php';

// autoloading
require_once 'Zend/Loader.php';
Zend_Loader::registerAutoload();
 
// préparation du front controller (avec environnement en paramètre)
$frontController = Zend_Controller_Front::getInstance();
$frontController->registerPlugin(new Initializer('development'));

$frontController->dispatch();
